<extend name="Home@Base/common" />
<block name="body">
<div class="span9 page_message">
	<section id="contents">
      <include file="Home@Addons/_nav" />
      
      
      <div class="box_title">
      <h3>
      <i class="i_edit">
      </i>
      会员交易
      </h3>
      </div>
      <div class="box-content">
      <div class="tab-content has-weixinpreivew"> 
     <h5>快捷交易</h5>
     <a class="tile tile_themed" onClick="$.WeiPHP.openSubmitDialog('会员消费','{:addons_url('Card://Member/do_buy?model='.$model['id'])}',600,600)" href="javascript:;">
     <i class="i_usd"></i>
     <div class="div_info">
     <strong>消费</strong>
     </div>
     </a>
     <a class="tile tile_themed" onClick="$.WeiPHP.openSubmitDialog('会员充值','{:addons_url('Card://Member/do_recharge?model='.$model['id'])}',600,400)" href="javascript:;">
     <i class="i_yen"></i>
     <div class="div_info">
     <strong>充值</strong>
     </div>
     </a>
     <a class="tile tile_themed" onClick="$.WeiPHP.openSubmitDialog('手动修改积分','{:addons_url('Card://Member/update_score?model='.$model['id'])}',600,400)" href="javascript:;">
     <i class="i_money"></i>
     <div class="div_info">
     <strong>手动修改积分</strong>
     </div>
     </a>
     <a class="tile tile_themed" onClick="$.WeiPHP.openSubmitDialog('券类核销','{:U('duihuang?model='.$model['id'])}',600,400)" href="javascript:;">
     <i class="i_gift"></i>
     <div class="div_info">
     <strong>券类核销</strong>
     </div>
     </a>
     
     
      </div>
      
      
      <div class="tab-content has-weixinpreivew"> 
     <h5>交易统计</h5>
     <a class="tile tile_themed" href="{:addons_url('Card://MemberTransition/buy_tongji')}">
     <i class="i_chart"></i>
     <div class="div_info">
     <strong>消费统计</strong>
     </div>
     </a>
     <a class="tile tile_themed"  href="{:addons_url('Card://MemberTransition/score_tongji')}">
     <i class="i_chart"></i>
     <div class="div_info">
     <strong>积分统计</strong>
     </div>
     </a>
     
 
      </div>
      
      
      <div class="tab-content has-weixinpreivew"> 
      
     <h5>交易明细查询</h5>
     <a class="tile tile_themed" href="{:addons_url('Card://MemberTransition/buy_lists')}">
     <i class="i_search"></i>
     <div class="div_info">
     <strong>消费查询</strong>
     </div>
     </a>
     <a class="tile tile_themed" href="{:addons_url('Card://MemberTransition/recharge_lists')}">
     <i class="i_search"></i>
     <div class="div_info">
     <strong>充值查询</strong>
     </div>
     </a>
     <a class="tile tile_themed"  href="{:addons_url('Card://MemberTransition/score_lists')}">
     <i class="i_search"></i>
     <div class="div_info">
     <strong>积分查询</strong>
     </div>
     </a>
     <a class="tile tile_themed"  href="{:addons_url('Card://MemberTransition/sncode_lists')}">
     <i class="i_search"></i>
     <div class="div_info">
     <strong>优惠券核销查询</strong>
     </div>
     </a>     
      
      </div>
      </div>
    </section>
 </div>
</block>

<block name="script">
<link type="text/css" rel="stylesheet" href="__STATIC__/colorpicker/colpick.css?v={:SITE_VERSION}"/>
<script type="text/javascript" src="__STATIC__/colorpicker/colpick.js?v={:SITE_VERSION}" charset="UTF-8"></script> 
<script type="text/javascript" charset="utf-8">
	//导航高亮
    $('.side-sub-menu').find('a[href="{:U('Addons/index')}"]').closest('li').addClass('current');
    if($('ul.tab-nav').length){
    	$('.btn-return').hide();
    }
	$(function(){
		showTab();
		initUploadImg();
		$('#select_background').change(function(){
				if($(this).val()==11){
					$('#customBackground').show();
				}else{
					var cardBgUrl = '{:ADDON_PUBLIC_PATH}/card_bg_'+$(this).val()+".png";
					$('#cardBg').attr("href",cardBgUrl);
					$('#cardBgImg').attr("src",cardBgUrl);
					$('#customBackground').hide();
				}
		});
		$('#select_length').change(function(){
			var val = 'NO. '+$(this).val();
			$('#cardNumber').html(val);
		});		
		$('#title').keyup(function(){
			$('.card_name').html($(this).val());
		})
		
		//初始化
		$('.card_name').html($('#title').val());
		$('#cardNumber').html('NO. '+$('#select_length').val());
		if($('#select_background').val()==11){
			$('#customBackground').show();
			var cardBgUrl = $("#hidden_background_custom").val();
		}else{
			var cardBgUrl = '{:ADDON_PUBLIC_PATH}/card_bg_'+$('#select_background').val()+".png";
			$('#customBackground').hide();
		}	
		$('#cardBg').attr("href",cardBgUrl);
		$('#cardBgImg').attr("src",cardBgUrl);	
		//反面初始化
		$('#select_back_background').change(function(){
				if($(this).val()==11){
					$('#customBackBackground').show();
				}else{
					var cardBgUrl = '{:ADDON_PUBLIC_PATH}/card_bg_'+$(this).val()+".png";
					$('#cardBackBg').attr("href",cardBgUrl);
					$('#cardBackBgImg').attr("src",cardBgUrl);
					$('#customBackBackground').hide();
				}
		});	
		$('#instruction').keyup(function(){
			$('.intro').html($(this).val());
		})
		
		//初始化
		$('.intro').html($('#instruction').val());
		if($('#select_back_background').val()==11){
			$('#customBackBackground').show();
			var cardBgUrl = $("#hidden_back_background_custom").val();
		}else{
			var cardBgUrl = '{:ADDON_PUBLIC_PATH}/card_bg_'+$('#select_back_background').val()+".png";
			$('#customBackBackground').hide();
		}	
		$('#cardBackBg').attr("href",cardBgUrl);
		$('#cardBackBgImg').attr("src",cardBgUrl);
		
		//初始化颜色控件
		$('.color_picker').each(function(index, ele) {
            $(ele).colpick({
			colorScheme:'white',
			submitText:"确定",
			layout:'rgbhex',
			color:'ff8800',
			onSubmit:function(hsb,hex,rgb,el) {
					$(el).css('background-color', '#'+hex);
					$(el).colpickHide();
					$(el).prev().val('#'+hex);
					$('.'+$(el).data('color')).css('color','#'+hex);
					
				}
			});
			$('.'+$(ele).data('color')).css('color',$('#'+$(ele).data('color')).val());
        });	
	})
</script>
</block>
